﻿
//------------------------------------------------------------------------------

namespace Apps.Models
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure;
    using System.Data.Entity.Core.Objects;
    using System.Linq;
    using Apps.Common;
    using System.Data.Common;
    using System.Collections.Generic;
    using System.Data;
    using Oracle.ManagedDataAccess.Client;
    using S;
    using PL;

    public partial class DBContainer  
    {
        public DbParameter CreateInParameter<T>(string paramNName, DbType type, Nullable<T> val) where T : struct
        {
            var ret = this.Database.Connection.CreateCommand().CreateParameter();
            ret.ParameterName = paramNName;
            ret.Direction = ParameterDirection.Input;
            ret.DbType = type;
            if (val.HasValue)
            {
                ret.Value = val.Value;
            }
            else
            {
                ret.Value = DBNull.Value;
            }
            return ret;
        }
        public DbParameter CreateInParameter(string paramNName, DbType type,object val)
        {
            var ret = this.Database.Connection.CreateCommand().CreateParameter();
            ret.ParameterName = paramNName;
            ret.Direction = ParameterDirection.Input;
            ret.DbType = type;
            ret.Value = val;
            return ret;
        }
        public DbParameter CreateOutParameter(string paramNName, DbType type, int size)
        {
            var ret = this.Database.Connection.CreateCommand().CreateParameter();
            ret.ParameterName = paramNName;
            ret.Direction = ParameterDirection.Output;
            ret.DbType = type;
            ret.Size = size;
            return ret;
        }

        public Dictionary<string, object> ExecuteProduce(string produceName, params DbParameter[] paramLst)
        {
            Dictionary<string, object> ret = new Dictionary<string, object>();
            DbConnection con = this.Database.Connection;
            DbCommand cmdPro = con.CreateCommand();
            cmdPro.CommandType = System.Data.CommandType.StoredProcedure;
            cmdPro.CommandText = produceName;
            cmdPro.Parameters.AddRange(paramLst);
            cmdPro.Connection = con;
            if (con.State == ConnectionState.Closed) con.Open();
            cmdPro.ExecuteNonQuery();
            foreach (DbParameter outParam in cmdPro.Parameters)
            {
                if (outParam.Direction == System.Data.ParameterDirection.Output ||
                    outParam.Direction == System.Data.ParameterDirection.InputOutput)
                {
                    ret.Add(outParam.ParameterName, outParam.Value);
                }
            }
            con.Close();
            return ret;
        }

        public Dictionary<string, object> ExecuteOraProduceRetTable(string produceName, string[] refCursorParametersName, params DbParameter[] paramLst)
        {
            Dictionary<string, object> ret = new Dictionary<string, object>();
            DataSet dsRet = new DataSet();
            DbConnection con = this.Database.Connection;
            OracleCommand cmdPro = new OracleCommand();
            cmdPro.CommandType = System.Data.CommandType.StoredProcedure;
            cmdPro.CommandText = produceName;
            //foreach (DbParameter dbParam in paramLst)
            //{
            //    cmdPro.Parameters.Add(new OracleParameter(dbParam.ParameterName, OracleDbType.Varchar2, dbParam.Value, dbParam.Direction));
            //}
            cmdPro.Parameters.AddRange(paramLst);
            foreach (string dbOutParamName in refCursorParametersName)
            {
                cmdPro.Parameters.Add(new OracleParameter(dbOutParamName, OracleDbType.RefCursor,ParameterDirection.Output));
            }
            cmdPro.Connection = con as OracleConnection;
            OracleDataAdapter oda = new OracleDataAdapter(cmdPro);
            oda.Fill(dsRet);
            foreach (DbParameter outParam in paramLst)
            {
                if (outParam.Direction == System.Data.ParameterDirection.Output ||
                    outParam.Direction == System.Data.ParameterDirection.InputOutput)
                {
                    ret.Add(outParam.ParameterName, outParam.Value);
                }
            }
            for (int i=0;i< refCursorParametersName.Length;i++)
            {
                ret.Add(refCursorParametersName[i], dsRet.Tables[i]);
            }
            return ret;
        }
        public virtual DbSet<V_HP_LMS> V_HP_LMS { get; set; }
        public virtual DbSet<V_HP_BLANCE_EXPEND> V_HP_BLANCE_EXPEND { get; set; }
        public virtual DbSet<V_HP_CALORIFIC_DIFFERENCE> V_HP_CALORIFIC_DIFFERENCE { get; set; }
        public virtual DbSet<V_HP_RC_BLANCE> V_HP_RC_BLANCE { get; set; }
        public virtual DbSet<V_STATS_RC_PLAN_WEIGHTING> V_STATS_RC_PLAN_WEIGHTING { get; set; }
        public virtual DbSet<V_HP_COAL_STRUCTURE> V_HP_COAL_STRUCTURE { get; set; }
        public virtual DbSet<V_S_BLENDSAMPLE_RC> V_S_BLENDSAMPLE_RC { get; set; }
        public virtual DbSet<V_S_BLENDSAMPLE_RL> V_S_BLENDSAMPLE_RL { get; set; }
        public virtual DbSet<V_S_COLLECTSAMPLE_RC> V_S_COLLECTSAMPLE_RC { get; set; }
        public virtual DbSet<V_S_COLLECTSAMPLE_RL> V_S_COLLECTSAMPLE_RL { get; set; }
        public virtual DbSet<V_S_SAMPLE_RC> V_S_SAMPLE_RC { get; set; }
        public virtual DbSet<V_S_SAMPLE_RL> V_S_SAMPLE_RL
        {
            get; set;
        }
        public virtual DbSet<V_STATS_RC_PLAN_RESULT> V_STATS_RC_PLAN_RESULT { get; set; }
        public virtual DbSet<V_RC_WEIGHT_UP_DETAIL> V_RC_WEIGHT_UP_DETAIL { get; set; }
        public virtual DbSet<V_RC_WEIGHT_UP_MAIN> V_RC_WEIGHT_UP_MAIN { get; set; }
        public virtual DbSet<RC_IN> RC_IN { get; set; }
        public virtual DbSet<RC_OUT> RC_OUT { get; set; }
        public virtual DbSet<RC_PARKING> RC_PARKING { get; set; }
        public virtual DbSet<RC_PROCESS> RC_PROCESS { get; set; }
        public virtual DbSet<RC_PROCESS_DETAIL> RC_PROCESS_DETAIL { get; set; }
        public virtual DbSet<RC_SAMPLING> RC_SAMPLING { get; set; }
        public virtual DbSet<RC_UPLOADING> RC_UPLOADING { get; set; }
        public virtual DbSet<RC_WEIGHING> RC_WEIGHING { get; set; }
        public virtual DbSet<RC_WEIGHING_RECORD> RC_WEIGHING_RECORD { get; set; } 
        public virtual DbSet<RC_WEIGHING_TMP> RC_WEIGHING_TMP { get; set; }
        public virtual DbSet<RC_SAMPLING_IMAGE> RC_SAMPLING_IMAGE { get; set; }
        public virtual DbSet<RC_SAMPLING_POINT> RC_SAMPLING_POINT { get; set; }
        public virtual DbSet<RC_UPLOADING_IMAGE> RC_UPLOADING_IMAGE { get; set; }
        public virtual DbSet<RC_WEIGHING_IMAGE> RC_WEIGHING_IMAGE { get; set; }
        //public virtual DbSet<RC_SCHEME_PLAN> RC_SCHEME_PLAN { get; set; }
        public virtual DbSet<V_RC_IN> V_RC_IN { get; set; }
        public virtual DbSet<V_RC_OUT> V_RC_OUT { get; set; }
        public virtual DbSet<V_RC_PARKING> V_RC_PARKING { get; set; }
        public virtual DbSet<V_RC_PROCESS> V_RC_PROCESS { get; set; }

        public virtual DbSet<V_RC_SAMPLING> V_RC_SAMPLING { get; set; }
        public virtual DbSet<V_RC_UPLOADING> V_RC_UPLOADING { get; set; }
        public virtual DbSet<V_RC_WEIGHING> V_RC_WEIGHING { get; set; }
        public virtual DbSet<V_GDH_WEIGHING> V_GDH_WEIGHING { get; set; }
        public virtual DbSet<V_RC_WEIGHING_TMP> V_RC_WEIGHING_TMP { get; set; }
        public virtual DbSet<V_RC_WEIGHING_RECORD> V_RC_WEIGHING_RECORD { get; set; }

        public virtual DbSet<DI_ASSAY> DI_ASSAY { get; set; }
        public virtual DbSet<DI_METERING> DI_METERING { get; set; }

        //CY
        public virtual DbSet<CY_ADJUST> CY_ADJUST { get; set; }

        public virtual DbSet<V_CY_COAL_STRUCTURE> V_CY_COAL_STRUCTURE { get; set; }
        public virtual DbSet<CY_COAL_STRUCTURE> CY_COAL_STRUCTURE { get; set; }
        public virtual DbSet<CY_INSTOCK> CY_INSTOCK { get; set; }
        public virtual DbSet<CY_INSTOCK_DETAIL> CY_INSTOCK_DETAIL { get; set; }
        public virtual DbSet<CY_MIX_AGC> CY_MIX_AGC { get; set; }
        public virtual DbSet<CY_MIX_CONDITION> CY_MIX_CONDITION { get; set; }
        public virtual DbSet<CY_MIX_MIXDETAIL> CY_MIX_MIXDETAIL { get; set; }
        public virtual DbSet<CY_MIX_PROJECT> CY_MIX_PROJECT { get; set; }
        public virtual DbSet<CY_OUTSTOCK> CY_OUTSTOCK { get; set; }
        public virtual DbSet<CY_OUTSTOCK_DETAIL> CY_OUTSTOCK_DETAIL { get; set; }
        public virtual DbSet<V_CY_INSTOCK_DETAIL> V_CY_INSTOCK_DETAIL { get; set; }

        public virtual DbSet<V_LMS_RESULT_AUDIT> V_LMS_RESULT_AUDIT { get; set; }
        public virtual DbSet<V_LMS_RESULT> V_LMS_RESULT { get; set; }
        public virtual DbSet<YANX_RECORD> YANX_RECORD { get; set; }
        public virtual DbSet<V_LMS_SAMPLERESULT> V_LMS_SAMPLERESULT { get; set; }
        
        public virtual DbSet<V_STATS_LMS_PLAN_RESULT> V_STATS_LMS_PLAN_RESULT { get; set; }
        //public virtual DbSet<V_STATS_LMS_PLAN_RESULT> V_STATS_LMS_PLAN_RESULT { get; set; }
        //public virtual DbSet<V_STATS_LMS_PLAN_RESULT_PLUS> V_STATS_LMS_PLAN_RESULT_PLUS { get; set; }
        public virtual DbSet<V_RPT_LMS_BATCH> V_RPT_LMS_BATCH { get; set; }

        public virtual DbSet<V_RPT_LMS_BATCH_RZC> V_RPT_LMS_BATCH_RZC { get; set; }
        public virtual DbSet<V_LMS_SAMPLE> V_LMS_SAMPLE { get; set; }
        public virtual DbSet<V_LMS_QUERY_RC> V_LMS_QUERY { get; set; }
        public virtual DbSet<V_LMS_QUERY_RL> V_LMS_QUERY2 { get; set; }
        public virtual DbSet<V_LMS_TESTDATA_CONFIRMED> V_LMS_TESTDATA_CONFIRMED { get; set; }
        public virtual DbSet<V_LMS_TESTDATA_RESULT> V_LMS_TESTDATA_RESULT { get; set; }
        public virtual DbSet<V_PL_ALL_DETAILS> V_PL_ALL_DETAILS { get; set; }
        
        public virtual DbSet<V_FLOW_STEPINFO> V_FLOW_STEPINFO { get; set; }
        public virtual DbSet<PL_RC_TRANSPORT> PL_RC_TRANSPORT { get; set; }

        public virtual DbSet<API_DETAIL> API_DETAIL { get; set; }
        public virtual DbSet<API_ROLE> API_ROLE { get; set; }
        public virtual DbSet<CONTRACT_AMOUNT> CONTRACT_AMOUNT { get; set; }
        public virtual DbSet<CONTRACT_DETAIL> CONTRACT_DETAIL { get; set; }
        public virtual DbSet<CONTRACT_INFO> CONTRACT_INFO { get; set; }
        public virtual DbSet<CONTRACT_MONTH> CONTRACT_MONTH { get; set; }
        public virtual DbSet<CONTRACT_QUALITY> CONTRACT_QUALITY { get; set; }
        public virtual DbSet<CONTRACT_QUALITY_CHECK> CONTRACT_QUALITY_CHECK { get; set; }
        public virtual DbSet<CONTRACT_QUALITY_DETAIL> CONTRACT_QUALITY_DETAIL { get; set; }
        public virtual DbSet<CONTRACT_QUALITY_LIST> CONTRACT_QUALITY_LIST { get; set; }
        public virtual DbSet<CONTRACT_SETTLEMENT> CONTRACT_SETTLEMENT { get; set; }
        public virtual DbSet<DEV_CHECK> DEV_CHECK { get; set; }
        public virtual DbSet<DEV_COME> DEV_COME { get; set; }
        public virtual DbSet<DEV_EXPERIENCE> DEV_EXPERIENCE { get; set; }
        public virtual DbSet<DEV_GREASE> DEV_GREASE { get; set; }
        public virtual DbSet<DEV_MEMORABILIA> DEV_MEMORABILIA { get; set; }
        public virtual DbSet<DEV_SPARE> DEV_SPARE { get; set; }
        public virtual DbSet<DEV_TECHNICAL> DEV_TECHNICAL { get; set; }
        public virtual DbSet<LMS_COLLECTSAMPLE> LMS_COLLECTSAMPLE { get; set; }
        public virtual DbSet<LMS_TESTDATA_AUDIT> LMS_TESTDATA_AUDIT { get; set; }
        public virtual DbSet<LMS_TESTDATA_COLLECTION> LMS_TESTDATA_COLLECTION { get; set; }
        public virtual DbSet<LMS_TESTDATA_CONFIRMED> LMS_TESTDATA_CONFIRMED { get; set; }
        public virtual DbSet<LOG_LOGIN> LOG_LOGIN { get; set; }
        public virtual DbSet<LOG_OPERATE> LOG_OPERATE { get; set; }
        public virtual DbSet<LOG_SAMPLEACCESS> LOG_SAMPLEACCESS { get; set; }
        public virtual DbSet<LOG_SYS> LOG_SYS { get; set; }
        public virtual DbSet<LOG_WORK> LOG_WORK { get; set; }
        public virtual DbSet<PL_RC_DETAILS> PL_RC_DETAILS { get; set; }
        public virtual DbSet<PL_RC_PLANS> PL_RC_PLANS { get; set; }
        //public virtual DbSet<PL_RC_TRANSPORT> PL_RC_TRANSPORT { get; set; }
        public virtual DbSet<PL_RL_DETAILS> PL_RL_DETAILS { get; set; }
        public virtual DbSet<PLAN_CONTRACT_ANNEXS> PLAN_CONTRACT_ANNEXS { get; set; }
        public virtual DbSet<PLAN_PRODUCTION> PLAN_PRODUCTION { get; set; }
        public virtual DbSet<PLAN_PRODUCTION_DEMAND> PLAN_PRODUCTION_DEMAND { get; set; }
        //public virtual DbSet<PLAN_PRODUCTION_DEMAND> PLAN_PRODUCTION_DEMAND { get; set; }
        public virtual DbSet<PLAN_PURCHASE> PLAN_PURCHASE { get; set; }
        public virtual DbSet<PLAN_PURCHASE_DEMAND> PLAN_PURCHASE_DEMAND { get; set; }
        public virtual DbSet<PLAN_PURCHASE_DETAIL> PLAN_PURCHASE_DETAIL { get; set; }
        public virtual DbSet<PLAN_TEMPPURCHASE> PLAN_TEMPPURCHASE { get; set; }
        public virtual DbSet<PLAN_TEMPPURCHASEDETAIL> PLAN_TEMPPURCHASEDETAIL { get; set; }

        public virtual DbSet<V_STATS_RL_PLAN_RESULT> V_STATS_RL_PLAN_RESULT { get; set; }
        public virtual DbSet<V_STATS_RL_BATCH_LMS_RL_TZ> V_STATS_RL_BATCH_LMS_RL_TZ { get; set; }
        public virtual DbSet<V_STATS_RL_BATCH_LMS_RL_TZ_YY> V_STATS_RL_BATCH_LMS_RL_TZ_YY { get; set; }
        public virtual DbSet<PUB_CAR> PUB_CAR { get; set; }
        public virtual DbSet<PUB_CREW> PUB_CREW { get; set; }
        public virtual DbSet<PUB_CY_COALYARD> PUB_CY_COALYARD { get; set; }
        public virtual DbSet<PUB_CY_PARTITION> PUB_CY_PARTITION { get; set; }
        public virtual DbSet<PUB_CY_STOCKPILE> PUB_CY_STOCKPILE { get; set; }
        public virtual DbSet<PUB_DEV_CAMERA> PUB_DEV_CAMERA { get; set; }
        public virtual DbSet<PUB_DEV_LOCKER> PUB_DEV_LOCKER { get; set; }
        public virtual DbSet<PUB_DEV_MEDIASERVER> PUB_DEV_MEDIASERVER { get; set; }
        public virtual DbSet<PUB_DEVICE> PUB_DEVICE { get; set; }
        public virtual DbSet<PUB_DEVICEMODEL> PUB_DEVICEMODEL { get; set; }
        public virtual DbSet<PUB_DEVICETYPE> PUB_DEVICETYPE { get; set; }
        public virtual DbSet<PUB_EQUIPMENT> PUB_EQUIPMENT { get; set; }
        public virtual DbSet<PUB_LMS_INDEX> PUB_LMS_INDEX { get; set; }
        public virtual DbSet<PUB_LMS_PRINTCONFIG> PUB_LMS_PRINTCONFIG { get; set; }
        public virtual DbSet<V_LMS_UP> V_LMS_UP { get; set; }
        public virtual DbSet<PUB_MANUFACTURER> PUB_MANUFACTURER { get; set; }
        public virtual DbSet<PUB_MATERIEL> PUB_MATERIEL { get; set; }
        public virtual DbSet<PUB_MATERIEL_TYPE> PUB_MATERIEL_TYPE { get; set; }
        public virtual DbSet<PUB_MINE> PUB_MINE { get; set; }
        public virtual DbSet<PUB_OF_DETAIL> PUB_OF_DETAIL { get; set; }
        public virtual DbSet<PUB_OF_NODE> PUB_OF_NODE { get; set; }
        public virtual DbSet<PUB_OF_TACHE> PUB_OF_TACHE { get; set; }
        public virtual DbSet<PUB_OF_TEMPLATE> PUB_OF_TEMPLATE { get; set; }
        public virtual DbSet<PUB_STATION> PUB_STATION { get; set; }
        public virtual DbSet<PUB_SUPPLIER> PUB_SUPPLIER { get; set; }
        public virtual DbSet<PUB_TEAM> PUB_TEAM { get; set; }
        public virtual DbSet<PUB_TRANSPORT> PUB_TRANSPORT { get; set; }
        public virtual DbSet<PUB_SCHEME> PUB_SCHEME { get; set; }

        public virtual DbSet<RL_SAMPLING> RL_SAMPLING { get; set; }
        public virtual DbSet<RPT_RL_LMS_DAY> RPT_RL_LMS_DAY { get; set; }
        public virtual DbSet<RPT_RL_LMS_YEAR> RPT_RL_LMS_YEAR { get; set; }
        public virtual DbSet<S_BLENDSAMPLE> S_BLENDSAMPLE { get; set; }
        public virtual DbSet<V_S_BLENDSAMPLE> V_S_BLENDSAMPLE { get; set; }
        public virtual DbSet<S_BLENDSAMPLE_DETAIL> S_BLENDSAMPLE_DETAIL { get; set; }
        public virtual DbSet<S_COLLECTSAMPLE> S_COLLECTSAMPLE { get; set; }
        public virtual DbSet<S_MAKESAMPLE> S_MAKESAMPLE { get; set; }
        public virtual DbSet<V_S_MAKESAMPLE> V_S_MAKESAMPLE { get; set; }
        public virtual DbSet<V_S_MAKESAMPLE_RC> V_S_MAKESAMPLE_RC { get; set; }
        public virtual DbSet<V_S_MAKESAMPLE_RL> V_S_MAKESAMPLE_RL { get; set; }
        public virtual DbSet<S_SAMPLE> S_SAMPLE { get; set; }
        public virtual DbSet<S_SAMPLE_CHECK> S_SAMPLE_CHECK { get; set; }
        public virtual DbSet<S_SAMPLE_CHECKDETAIL> S_SAMPLE_CHECKDETAIL { get; set; }
        public virtual DbSet<S_SAMPLE_SAVE> S_SAMPLE_SAVE { get; set; }
        public virtual DbSet<SYS_DEPTS> SYS_DEPTS { get; set; }
        public virtual DbSet<SYS_MENUS> SYS_MENUS { get; set; }
        public virtual DbSet<SYS_PARAMETER> SYS_PARAMETER { get; set; }
        public virtual DbSet<SYS_POWERS> SYS_POWERS { get; set; }
        public virtual DbSet<SYS_ROLES> SYS_ROLES { get; set; }
        public virtual DbSet<SYS_USERS> SYS_USERS { get; set; }
        public virtual DbSet<WORKFLOW_AUDITDETAIL> WORKFLOW_AUDITDETAIL { get; set; }
        public virtual DbSet<WORKFLOW_DETAIL> WORKFLOW_DETAIL { get; set; }
        public virtual DbSet<WORKFLOW_TEMPLATE> WORKFLOW_TEMPLATE { get; set; }
        public virtual DbSet<LOG_ACCESS> LOG_ACCESS { get; set; }
        public virtual DbSet<PUB_SUPPLIERMETERIEL> PUB_SUPPLIERMETERIEL { get; set; }
       
        public virtual DbSet<SYS_ROLEPOWER> SYS_ROLEPOWER { get; set; }
        public virtual DbSet<SYS_ROLEUSER> SYS_ROLEUSER { get; set; }
        public virtual DbSet<V_LMS_COLLECTSAMPLE> V_LMS_COLLECTSAMPLE { get; set; }
        public virtual DbSet<V_LOG_SAMPLEACCESS> V_LOG_SAMPLEACCESS { get; set; }
        public virtual DbSet<V_PL_RC_DETAILS> V_PL_RC_DETAILS { get; set; }
        public virtual DbSet<V_LMS_TESTDATA_ADDBATCH> V_LMS_TESTDATA_ADDBATCH { get; set; }
        public virtual DbSet<V_LMS_TESTDATA_BATCH> V_LMS_TESTDATA_BATCH { get; set; }
        public virtual DbSet<V_PL_RC_PLANS> V_PL_RC_PLANS { get; set; }
        public virtual DbSet<V_PUB_CY_STOCKPILE> V_PUB_CY_STOCKPILE { get; set; }
        public virtual DbSet<V_PUB_MATERIEL> V_PUB_MATERIEL { get; set; }
      
        public virtual DbSet<V_RL_SAMPLING> V_RL_SAMPLING { get; set; }
        public virtual DbSet<V_S_SAMPLE> V_S_SAMPLE { get; set; }
        public virtual DbSet<V_S_SAMPLEEXPIRE> V_S_SAMPLEEXPIRE { get; set; }
        public virtual DbSet<V_S_SAMPLEEXPIRE_RL> V_S_SAMPLEEXPIRE_RL { get; set; }
        public virtual DbSet<V_S_SAMPLEEXPIRE_RC> V_S_SAMPLEEXPIRE_RC { get; set; }
        public virtual DbSet<V_S_SAMPLE_SAVE> V_S_SAMPLE_SAVE { get; set; }
        public virtual DbSet<API_RELATION> API_RELATION { get; set; }
        public virtual DbSet<API_ROLEUSER> API_ROLEUSER { get; set; }
        public virtual DbSet<PUB_CAR_BLACKLIST> PUB_CAR_BLACKLIST { get; set; }
        public virtual DbSet<V_STATS_RC_WEIGHTING> V_STATS_RC_WEIGHTING { get; set; }
        public virtual DbSet<V_HC_WEIGHING> V_HC_WEIGHING { get; set; }
        public virtual DbSet<V_STATS_RL_PLAN_WEIGHTING> V_STATS_RL_PLAN_WEIGHTING { get; set; }
        public virtual DbSet<V_REPORT_SAMPLE_CHECK_RESULT> V_REPORT_SAMPLE_CHECK_RESULT { get; set; }
        public virtual DbSet<V_RPT_RECHECK_RESULT> V_RPT_RECHECK_RESULT { get; set; }
        public virtual DbSet<PL_RC_UPLOADING> PL_RC_UPLOADING { get; set; }
        public virtual DbSet<V_PL_RC_UPLOADING> V_PL_RC_UPLOADING { get; set; }
        public virtual DbSet<V_RPT_RCM_DETAIL> V_RPT_RCM_DETAIL { get; set; }
        public virtual DbSet<V_RPT_JHC_DAY> V_RPT_JHC_DAY { get; set; }
        public virtual DbSet<V_RPT_JHC_MONTH> V_RPT_JHC_MONTH { get; set; }
        public virtual DbSet<V_RPT_LMS_ALL_MONTH> V_RPT_LMS_ALL_MONTH { get; set; }

        public virtual DbSet<RPT_LMS_RZC> RPT_LMS_RZC { get; set; }
        public virtual DbSet<V_RL_COLLECT_HOUR> V_RL_COLLECT_HOUR { get; set; }

        public virtual DbSet<V_RPT_RC_LMS_DAY> V_RPT_RC_LMS_DAY { get; set; }
        public virtual DbSet<V_RPT_RC_WEIGHT_DAY> V_RPT_RC_WEIGHT_DAY { get; set; }
        public virtual DbSet<V_RPT_RC_WEIGHT_DAY_QT> V_RPT_RC_WEIGHT_DAY_QT { get; set; }
        public virtual DbSet<V_RPT_RL_PD_WEIGHING_MONTH> V_RPT_RL_PD_WEIGHING_MONTH { get; set; }
        public virtual DbSet<V_STATS_RL_SML_MONTH> V_STATS_RL_SML_MONTH { get; set; }
        public virtual DbSet<V_STATS_RL_SML_YEAR> V_STATS_RL_SML_YEAR { get; set; }
        public virtual DbSet<PUB_SUPPLIERTRANSPORT> PUB_SUPPLIERTRANSPORT { get; set; }

        public virtual DbSet<CY_INVENTORY> CY_INVENTORY { get; set; } //煤场盘煤


        public virtual DbSet<V_LOG_LMSEXCHANGE> V_LOG_LMSEXCHANGE { get; set; }  //修改化验数据
        public virtual DbSet<V_LMS_BATCH_AUDIT> V_LMS_BATCH_AUDIT { get; set; }  //修改化验数据
        public virtual DbSet<V_LMS_TESTDATA_YSFX> V_LMS_TESTDATA_YSFX { get; set; }
        public virtual DbSet<LMS_TESTDATA_YSFX> LMS_TESTDATA_YSFX { get; set; }

        public virtual DbSet<V_PL_BATCH_FOR_TEST> V_PL_BATCH_FOR_TEST { get; set; }

        public virtual DbSet<V_PUB_SCHEME> V_PUB_SCHEME { get; set; }
        public virtual DbSet<V_PUB_DEV_CAMERAS> V_PUB_DEV_CAMERAS { get; set; }


        public virtual DbSet<PUB_CAR_OPERATE> PUB_CAR_OPERATE { get; set; }



        public virtual DbSet<PL_HC_DETAILS> PL_HC_DETAILS { get; set; }
        public virtual DbSet<PL_HC_PLANS> PL_HC_PLANS { get; set; }
        public virtual DbSet<PUB_TRAIN_TYPE> PUB_TRAIN_TYPE { get; set; }

        public virtual DbSet<V_PL_HC_PLANS> V_PL_HC_PLANS { get; set; }

        public virtual DbSet<V_RC_HC_WEIGHING> V_RC_HC_WEIGHING { get; set; }
        public virtual DbSet<V_RC_HC_WEIGHING_DETAIL> V_RC_HC_WEIGHING_DETAIL { get; set; }

        public virtual DbSet<RC_HC_WEIGHING> RC_HC_WEIGHING { get; set; }
        public virtual DbSet<RC_HC_WEIGHING_DETAIL> RC_HC_WEIGHING_DETAIL { get; set; }
        public virtual DbSet<CY_COAL_SAVE> CY_COAL_SAVE { get; set; }
        public virtual DbSet<CY_COAL_SAVEDETAIL> CY_COAL_SAVEDETAIL { get; set; }
        public virtual DbSet<V_CY_COALSAVE> V_CY_COALSAVE { get; set; }

        public virtual DbSet<V_CY_BATCHINFO> V_CY_BATCHINFO { get; set; }
        public virtual DbSet<V_CY_TOPCOALSAVE> V_CY_TOPCOALSAVE { get; set; }

        public virtual DbSet<V_RC_TRAINNUM_UNLOADINFO> V_RC_TRAINNUM_UNLOADINFO { get; set; }
        public virtual DbSet<RC_TRAINNUM> RC_TRAINNUM { get; set; }
        public virtual DbSet<V_CY_CURRENTCOAL> V_CY_CURRENTCOAL { get; set; }

        public virtual DbSet<V_RPT_CURRENTCOAL_DAY> V_RPT_CURRENTCOAL_DAY { get; set; }
        public virtual DbSet<V_RPT_CURRENTCOAL_DAYTARGET> V_RPT_CURRENTCOAL_DAYTARGET { get; set; }

        public virtual DbSet<V_RPT_CURRENTCOAL_DAYSTOCK> V_RPT_CURRENTCOAL_DAYSTOCK { get; set; }
        public virtual DbSet<LMS_TEMPLATE> LMS_TEMPLATE { get; set; }
        public virtual DbSet<LMS_TEMPLATE_DETAIL> LMS_TEMPLATE_DETAIL { get; set; }
        public virtual DbSet<LMS_TEMPLATE_RELATION> LMS_TEMPLATE_RELATION { get; set; }
        public virtual DbSet<V_LMS_TEMPLATEDETAIL> V_LMS_TEMPLATEDETAIL { get; set; }
        public virtual DbSet<V_LMS_TEMPLATE_RELATION> V_LMS_TEMPLATE_RELATION { get; set; }
        public virtual DbSet<V_SELF_SAMPLING> V_SELF_SAMPLING { get; set; }
        public virtual DbSet<V_LMS_TESTDATA_COLLECTION> V_LMS_TESTDATA_COLLECTION { get; set; }
    }
}
